package leetcode.code2425;

public class Solution {

	public int xorAllNums(int[] nums1, int[] nums2) {
		int l1 = nums1.length, l2 = nums2.length;
		int ans = 0;
		if ((l1 & 1) == 1) {
			for (int i = 0; i < l2; i++) {
				ans ^= nums2[i];
			}
		}
		if ((l2 & 1) == 1) {
			for (int i = 0; i < l1; i++) {
				ans ^= nums1[i];
			}
		}
		return ans;
	}

}
